package com.platform.file.config;

import com.platform.file.interceptor.FileUploadInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;

/**
 * @author twd
 * @date 2024/8/20 16:07
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {

    @Resource
    private FileUploadInterceptor fileUploadInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(fileUploadInterceptor).addPathPatterns("/**")
                .excludePathPatterns("/remote/uploadShareFile");;
    }


}
